{% extends 'base.html' %}
{% load static %}

{% block 'title' %}订单列表{% endblock%}
{% block 'header-title' %}订单列表{% endblock%}
{% block 'content' %}
    <div class="container">
        <h1>订单列表{% include 'widget-search.html'%}</h1>
        
        <div class="table-responsive">
            <table class="table  table-hover">
                <thead >
                    <tr>
                        <th>#</th>
                        <th>用户</th>
                        <th>地址</th>
                        <th>总价</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    {% for item in paginator %}
                    <tr>
                        <td>{{forloop.counter0|add:paginator.start_index}}</td>
                        <td>{{item.account}}</td>
                        <td>{{item.address}}</td>
                        <td>${{item.price}}</td>
                        <td><a class="btn-link" href="{% url 'order' item.pk %}">详情</a>
                            <a class="btn-link" href="{% url 'order_del' item.pk %}">删除</a class="btn btn-link"></td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
            {% include 'widget-paginator.html' %}
            {% include 'message.html' %}
        </div>
    </div>
{% endblock %}